package one.chchy.dp_demo.ui.home;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import java.util.Collections;
import java.util.List;

import one.chchy.dp_demo.enums.DeviceType;
import one.chchy.dp_demo.enums.ObjectDetect;

public class HomeViewModel extends ViewModel {

    private final MutableLiveData<String> mText;

    private final MutableLiveData<List<ObjectDetect>> mObjectDetect;

    private final MutableLiveData<List<DeviceType>> mDeviceType;

    public HomeViewModel() {
        mText = new MutableLiveData<>();
        mText.setValue("This is home fragment");

        mObjectDetect = new MutableLiveData<>();
        mObjectDetect.setValue(List.of(ObjectDetect.values()));

        mDeviceType = new MutableLiveData<>();
        mDeviceType.setValue(List.of(DeviceType.values()));
    }

    public LiveData<String> getText() {
        return mText;
    }

    public LiveData<List<ObjectDetect>> getObjectDetect() {
        return mObjectDetect;
    }

    public LiveData<List<DeviceType>> getDeviceType() { return mDeviceType; }
}